package org.jaaksi.butterknife.api;

import android.app.Activity;
import java.lang.reflect.Constructor;

/**
 * 可以做成java项目，引用Android包，这样就是jar包了
 */
public class InjectHelper {
  public static void inject(Activity host) {
    String classFullName = host.getClass().getName() + "$$ViewInjector";
    try {
      Class proxy = Class.forName(classFullName);
      Constructor constructor = proxy.getConstructor(host.getClass());
      constructor.newInstance(host);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}
